package com.framework.filter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.JoinPoint;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import com.common.model.StaffInfoModel;
import com.common.utils.SysConfig;

public class OperMethodInterceptor {
	private static Log log = LogFactory.getLog(OperMethodInterceptor.class);

	public void checkValidity(JoinPoint j) throws Exception {
		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();    
		StaffInfoModel userInfoModel = (StaffInfoModel) request.getSession()
				.getAttribute(SysConfig.ATTRIBUTE_USER_KEY);
		
	/*	if(userInfoModel==null||!userInfoModel.getOrgCode().equals("1002")){
			throw new Exception("no access!!!");
		}*/

	}

}
